import Vue from 'vue';
import Router from 'vue-router';
import Book from './components/book';
import Edit from './components/book/edit'

Vue.use(Router);

const routes = [
    {path: '/list', component: Book},
    {path: '/book', component: Edit},
    {path: '/book/:bookId', component: Edit},
    {path: '/', redirect: '/list'}
]

export default new Router({
    mode: 'history',
    routes
});